using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class gal_sectionsMap : EntityTypeConfiguration<gal_sections>
    {
        public gal_sectionsMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.SectionName)
                .HasMaxLength(50);

            this.Property(t => t.Identifier)
                .HasMaxLength(50);

            this.Property(t => t.SectionTable)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("gal_sections");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.SectionName).HasColumnName("SectionName");
            this.Property(t => t.Identifier).HasColumnName("Identifier");
            this.Property(t => t.SectionTable).HasColumnName("SectionTable");
            this.Property(t => t.Skip).HasColumnName("Skip");
        }
    }
}
